<?php
include 'ajaxinlcudes.php';
$contentId = $_GET["itemid"];
$update_comment = getUserCommentDetails($contentId);
$row_update_comment = mysql_fetch_assoc($update_comment);
$totalRows_update_comment = mysql_num_rows($update_comment);
?>
<form method="post" name="form2" action="<?php echo $editFormAction; ?>">
  <table align="center">
    <tr valign="baseline">
      <td nowrap align="left">User_comment_id:</td>
      <td><?php echo $row_update_comment['user_comment_id']; ?></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="left">User:</td>
      <td><input type="text" name="user_id" value="<?php echo $row_update_comment['user_id']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="left">Comment title:</td>
      <td><input type="text" name="comment_title" value="<?php echo $row_update_comment['comment_title']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="left">User comment message:</td>
      <td><textarea name="user_comment_message" cols="32"><?php echo $row_update_comment['user_comment_message']; ?></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="left">Comment date:</td>
      <td><input type="text" name="comment_date" value="<?php echo $row_update_comment['comment_date']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="left">Publish:</td>
      <td><select name="is_publish">
        <option value="yes" <?php if (!(strcmp("yes", $row_update_comment['is_publish']))) {echo "SELECTED";} ?>>Yes</option>
        <option value="no" <?php if (!(strcmp("no", $row_update_comment['is_publish']))) {echo "SELECTED";} ?>>No</option>
      </select>
      </td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="left">&nbsp;</td>
      <td><input type="submit" value="Update record"></td>
    </tr>
  </table>
  <input type="hidden" name="content_id" value="<?php echo $row_update_comment['content_id']; ?>">
  <input type="hidden" name="site_id" value="<?php echo $row_update_comment['site_id']; ?>">
  <input type="hidden" name="MM_update" value="frmCommentUpdate">
  <input type="hidden" name="user_comment_id" value="<?php echo $row_update_comment['user_comment_id']; ?>">
</form>
<p>
  <?php
    mysql_free_result($update_comment);
?>
</p>
